using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WorkflowActions;



namespace @SolutionName
{
    [Serializable]
    [ToolboxItem(typeof(@ClassNameToolboxItem))]
    [ActivityValidator(typeof(@ClassNameValidator))]
    [Designer(typeof(@ClassNameDesigner))]
    public partial class @ClassName : Activity
    {
        public @ClassName()
        {
            InitializeComponent();
        }

        public static DependencyProperty __ActivationPropertiesProperty = DependencyProperty.Register("__ActivationProperties",
            typeof(Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties), typeof(@ClassName));

        [ValidationOption(ValidationOption.Required)]
        public Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties __ActivationProperties
        {
            get
            {
                return (Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties)base.GetValue(__ActivationPropertiesProperty);
            }
            set
            {
                base.SetValue(__ActivationPropertiesProperty, value);

            }
        }


        /// <summary>
        /// Primary method called to run the Activity
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            try
            {
                /*To get item workflow is running on, use: 
                 *      SPListItem PayloadItem = __ActivationProperties.Item;
                 */
                

                /*
                 * Your Code Here...
                 */

                return ActivityExecutionStatus.Closed;
            }
            catch
            {
                return ActivityExecutionStatus.Faulting;
            }

        }



        /// <summary>
        /// Condition method used by Visual Studio workflows that can pass in the SPWorkflowActivationProperties for the
        /// current workflow
        /// </summary>
        /// <param name="props">SPWorkflowActivationProperties received from OnWorkflowActivated</param>
        /// <returns></returns>
        
        public static bool ConditionMethod(Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties props)
        {
            /*To get item workflow is running on, use: 
             *      SPListItem PayloadItem = props.Item;
             */

            bool bRetVal = false;

            /*
             * Your Code Here...
             */

            return bRetVal;
        }

        /// <summary>
        /// Condition method used by SPD workflows that can only pass in limited information
        /// </summary>
        /// <param name="context">SPWorkflowContext current workflow is running under</param>
        /// <param name="listId">string holding GUID of SPList workflow is attached to</param>
        /// <param name="listItem">Integer representing SPListItem within List</param>
        /// <returns></returns>
        public static bool ConditionMethod(WorkflowContext context, string listId, int listItem)
        {
            /*To get item workflow is running on, use: 
             *  context.Web.Lists[listId].
             *     string sListItemName = Microsoft.SharePoint.WorkflowActions.Helper.LookupString(context, listId, listItem, "Title");
             */

            bool bRetVal = false;

            /*
             * Your Code Here...
             */

            return bRetVal;
        }

    }
}
